<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <div th:replace="~{common::css}"></div>
    <title>标签</title>
</head>
<body class="m-body">
<!--导航-->
<div th:replace="~{common::topbar(n=3)}"></div>
<!--中间内容-->
<div class="m-padded-tb-big m-container">
    <div class="ui container">
        <!--header-->
        <div class="ui top attached segment" style="background: url(/images/groud.jpg)">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <h2 class="ui  teal header">标签</h2>
                </div>
                <div class=" right aligned column" >
                    共<h3 class="ui orange header m-inline-block m-text-thin" th:text="${#arrays.length(tagList)}">14</h3>个
                </div>
            </div>
        </div>
        <!--分类条目-->
        <div class="ui attached segment m-padded-tb-large"  style="background: url(/images/groud.jpg)">
            <div class="ui labeled button m-margin-tb-tiny" th:each="tag:${tagList}">

                <a  th:href="@{/toTags/{id}(id=${tag.getId()})}" class="ui    button"  th:classappend="${tag.getId()==n} ? 'teal' "><span th:text="${tag.getName()}"></span></a>
                <div class="ui    left pointing label"  th:classappend="${tag.getId()==n} ? 'blue' " th:text="${tag.getCount()}">24</div>
            </div>
        </div>
        <!--内容-->
        <div class="ui top attached teal   segment"   th:each="blog:${page.getList()}" style="background: url(/images/bg.jpg)">
            <div class="ui  padded  vertical segment m-padded-tb-large m-mobile-clear"  >
                <div class="ui  mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <!--文章内容-->
                        <h3 class="ui header " th:text="${blog.getTitle()}">你真正理解财富自由吗</h3>
                        <p class="m-text-thin m-text-spaced m-text-lined" th:text="${blog.getDescription()}"></p>
                        <div class="ui stackable grid">
                            <div class="eleven wider column">
                                <div class="ui horizontal link list mini">
                                    <!--博客信息-->
                                    <div class="item">
                                        <!--头像-->
                                        <img src="../static/images/varter.jpg" th:src="@{${blog.getAvatar()}}" alt="" class="ui avatar image">
                                        <!--名字-->
                                        <div class="content"><a href="#" class="header" th:text="${blog.getAuthor()}">StephenCurry</a></div>
                                    </div>
                                    <!--更新时间-->
                                    <div class="item">
                                        <i class="calendar alternate outline icon"></i>   <a href="#" th:text="${#dates.format(blog.getCreateTime(),'yyyy-MM-dd')}">  </a>
                                    </div>
                                    <!--浏览次数-->
                                    <div class="item">
                                        <a href="#" ><i class="eye  icon" ></i>&nbsp;&nbsp;<span th:text="${blog.getViews()}"></span> </a>
                                    </div>
                                </div>
                            </div>
                            <!--标签名字-->
                            <div class=" right aligned five wider column">
                                <a href="" target="_blank" class="ui teal basic label m-padded-tb-tiny m-text-thin" th:text="${blog.getFlag()}">认知升级</a>
                            </div>
                            <div class="ui   selection multiple   dropdown" style="background: url(/images/bg.jpg)">
                                <input type="hidden" name="tagIds"  th:value="${blog.getTagIds()}"  READONLY >

                                <div class="default text"></div>
                                <div class="menu" ARIA-READONLY="true">
                                    <div th:each="tag : ${tagList}" th:data-value="${tag.getId()}" th:text="${tag.getName()}"  class="item"  >Java</div>

                                </div>
                            </div>
                        </div>
                    </div>
                    <!--图片-->
                    <div class="five wide column">
                        <a th:href="@{/toBlog/{id}(id=${blog.getId()})}" target="_blank">
                            <img src="../static/images/blog.jpg" th:src="@{${blog.getFirstPicture()}}" alt="" class="ui rounded image">
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <!--上面是主内容-->
        <div class="ui bottom attached segment" th:if="${page.hasPreviousPage or page.hasNextPage}">
            <div class="ui middle aligned two column grid">
                <div class="column" th:if="${page.hasPreviousPage}">
                    <a th:href="@{/toTags/{id}(id=${n},pagNum=${page.getPageNum()-1})}"  class="ui  mini teal basic button">上一页</a>
                </div>
                <div class=" right aligned column" th:if="${page.hasNextPage}">
                    <a th:href="@{/toTags/{id}(id=${n},pagNum=${page.getPageNum()+1})}" class="ui  mini teal basic button">下一页</a>
                </div>
            </div>
        </div>
    </div>

</div>
<!--底部 footer-->
<div th:replace="~{common::footer}"></div>


<script src="../static/js/jquery-3.5.1.js" th:src="@{/js/jquery-3.5.1.js}"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
    <script>
        $('.menu.toggle').click(function (){
            $('.m-item').toggleClass('m-mobile-hide');

        });
        $('.ui.dropdown').dropdown({
            on : 'hover',
        });
    </script>
</body>

</html>